life is too short for a diary



Posts Tagged: monotonic stack

Next Greater Element I

The next greater element of some element x in an array is the first greater element that is to the right of x in the same array...

Continue reading → leetcode python monotonic stack